<template>
    <div class="goodsDesc-contain">
        <h1>{{ goodsdesc.title }}</h1>
        <hr>
        <div class="goodsDesc-content" v-html="goodsdesc.content"></div>
    </div>
</template>


<script>
    export default {
        data() {
            return {
                goodsdesc: {}
            }
        },
        created() {
            this.goodsDescinfo();
        },
        methods: {
            goodsDescinfo() {
                this.$http.get("api/goods/getdesc/" + this.$route.params.id).then(result => {
                    console.log(result.body);
                    if (result.body.status === 0) {
                        this.goodsdesc = result.body.message[0];
                    }
                })
            }
        }
    }
</script>


<style lang="scss" scoped>
    .goodsDesc-contain {
        padding: 4px;
        h1 {
            color: #226aff;
            font-size: 16px;
            text-align: center;
            margin: 15px 0;
        }
        .goodsDesc-content {
            img {
                width: 100%;
            }
        }
    }
</style>